define
(    
    function()
    {        
        ElementCreateAction = function(taskChangeId, frameChangeId, element)
        {          
            if (!element)
            {
                throw "element cannot be null";
            }

            this.toJSON = function()
            {
                return {id: this.id, taskChangeId: taskChangeId, frameChangeId: frameChangeId, element: element};
            };
        };

        ElementCreateAction.prototype.id = ElementCreateAction.id = "ElementCreateAction";
        return ElementCreateAction;        
    }
);